package pers.cz.exception;

/**
 * 抽象异常类供其他异常继承
 * @program: PostGirl-panent
 * @description: RuntimeExceptionWithCode
 * @author: Cheng Zhi
 * @create: 2021-03-11 14:01
 **/
public abstract class RuntimeExceptionWithCode extends RuntimeException{

    private String messageCode;

    public RuntimeExceptionWithCode() {

    }

    public RuntimeExceptionWithCode(String messageCode) {
        this.messageCode = messageCode;
    }

    /**
     * 普通异常包含exception和error
     * @param cause
     */
    public RuntimeExceptionWithCode(Throwable cause) {
        super(cause);
    }

    public RuntimeExceptionWithCode(String messageCode, Throwable cause) {
        super(cause);
        this.messageCode = messageCode;
    }

    public RuntimeExceptionWithCode(String messageCode, Throwable cause, Object... objs) {
        super(cause);
        this.messageCode = messageCode;
    }

    public String getMessageCode() {
        return messageCode;
    }


}
